<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:if test="${sessionScope.username!=null }">
<jsp:include page="head.jsp" />
<body class="page-body loaded" style="">
<jsp:include page="nav.jsp" />

<!-- 导入日历选择控件 -->

           <%
            //  取得servelt拿过来参数
             String username =  request.getParameter("username");
             String password =  request.getParameter("password");
             String maxll =  request.getParameter("maxll");
             String endtime =  request.getParameter("endtime");
             String bz=  request.getParameter("bz");
             request.setAttribute("username", username);
             request.setAttribute("password", password);
             request.setAttribute("maxll", maxll);
             request.setAttribute("endtime", endtime);
             request.setAttribute("bz", bz);
                     
        %>   
 
                    
                        
          <div class="page-title">
          <div class="title-env">
            <h1 class="title">添加账号</h1>
            <p class="description">此处按需要添加帐号密码</p>
          </div>
            <div class="breadcrumb-env">
            
               <ol class="breadcrumb bc-1">
                 <li>
                  <a href="#"><i class="fa-home"></i>首页</a>
                </li>
                <li class="active">
                      <strong>添加账号</strong>
                  </li>
              </ol>
                  
             </div>
           </div>

            <div class="row">
                <div class="col-sm-12">
                    
                  <div class="panel panel-default">
                    <div class="panel-heading">
                      <h3 class="panel-title">请输入帐号信息</h3>
                      
                      <div class="panel-options">
                       
                        
                        
                       
                        
                     
                      </div>
                    </div>
                    <div class="panel-body">

      


                <form action="${pageContext.request.contextPath }/addZhServlet" method="post" role="form" class="form-horizontal validate" novalidate="novalidate">
                  
                  <div class="form-group">
                    <label class="col-sm-2 control-label">会员账号</label>
                    <div class="col-sm-9">
                      <input type="text" class="form-control" id="field-1" placeholder="请输入帐号" name="user" data-validate="required" value="${requestScope.username}">
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="col-sm-2 control-label">帐号密码</label>
                    <div class="col-sm-9">
                      <input type="text" class="form-control" id="field-1" placeholder="请输入密码" name="pass" data-validate="required" value="${requestScope.password}">
                    </div>
                  </div>  

                  <div class="form-group">
                    <label class="col-sm-2 control-label">是否开通</label>
                    <div class="col-sm-9">
                      <select name="state" class="form-control">
                        <option value="开通">开通</option>
                        <option value="禁用">禁用</option>
                      </select> 
                    </div>
                  </div>  

                  <div class="form-group">
                    <label class="col-sm-2 control-label">开通流量</label>
                    <div class="col-sm-9">
                      <div class="input-group">
                        <input type="text" class="form-control" name="maxll" data-validate="required,number" value="${requestScope.maxll}">
                        <span class="input-group-addon">MB</span> 
                      </div>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="col-sm-2 control-label">到期日期</label>
                    <div class="col-sm-9">
                      <div class="input-group">
                        <input type="text" class="form-control datepicker" name="enddate"  onclick="WdatePicker()" value="${requestScope.endtime}">
                        
                        <div class="input-group-addon">
                      <i class="linecons-calendar">年/月/日</i>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="col-sm-2 control-label">账户备注</label>
                    <div class="col-sm-9">
                      <input type="text" class="form-control" id="field-1" placeholder="请输入备注" name="notes" value="${requestScope.bz }">
                    </div>
                  </div>  

                  <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div align="center" class="col-sm-9">
                   <p style="color:red;"> ${requestScope.errorMsg }</p>
                      <button type="submit" class="btn btn-info btn-block">添加</button>
                    </div>
                  </div>
                  
                </form>   
                      
                    </div>
                  
                  </div>
                    
                </div>

            </div>

   
            <!-- Main Footer -->
</c:if>
<jsp:include page="copy.jsp" />
<c:out value="${sessionScope.adminislogin}" escapeXml="false">
<script>alert('你还未登陆,或登陆已经超时！\n请你重新登陆哦！');window.location.href="${pageContext.request.contextPath}/management/admin/login.jsp";</script>
</c:out>